(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

lessElements(l, t) → lessE(l, t, 0)
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0) → false
le(0, m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Rewrite Strategy: FULL

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

S is empty.
Rewrite Strategy: FULL

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
lessE, le, length, toList, append

They will be analysed ascendingly in the following order:
le < lessE
length < lessE
toList < lessE
append < toList

(6) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
le, lessE, length, toList, append

They will be analysed ascendingly in the following order:
le < lessE
length < lessE
toList < lessE
append < toList

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

Induction Base:
le(gen_0':s7_0(+(1, 0)), gen_0':s7_0(0)) →RΩ(1)
false

Induction Step:
le(gen_0':s7_0(+(1, +(n9_0, 1))), gen_0':s7_0(+(n9_0, 1))) →RΩ(1)
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) →IH
false

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
length, lessE, toList, append

They will be analysed ascendingly in the following order:
length < lessE
toList < lessE
append < toList

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)

Induction Base:
length(gen_nil:cons:leaf:node6_0(0)) →RΩ(1)
0'

Induction Step:
length(gen_nil:cons:leaf:node6_0(+(n320_0, 1))) →RΩ(1)
s(length(gen_nil:cons:leaf:node6_0(n320_0))) →IH
s(gen_0':s7_0(c321_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
append, lessE, toList

They will be analysed ascendingly in the following order:
toList < lessE
append < toList

(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)

Induction Base:
append(gen_nil:cons:leaf:node6_0(0), gen_nil:cons:leaf:node6_0(b)) →RΩ(1)
gen_nil:cons:leaf:node6_0(b)

Induction Step:
append(gen_nil:cons:leaf:node6_0(+(n594_0, 1)), gen_nil:cons:leaf:node6_0(b)) →RΩ(1)
cons(hole_a4_0, append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b))) →IH
cons(hole_a4_0, gen_nil:cons:leaf:node6_0(+(b, c595_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(14) Complex Obligation (BEST)

(15) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
toList, lessE

They will be analysed ascendingly in the following order:
toList < lessE

(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol toList.

(17) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

The following defined symbols remain to be analysed:
lessE

(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol lessE.

(19) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

No more defined symbols left to analyse.

(20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

(21) BOUNDS(n^1, INF)

(22) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)
append(gen_nil:cons:leaf:node6_0(n594_0), gen_nil:cons:leaf:node6_0(b)) → gen_nil:cons:leaf:node6_0(+(n594_0, b)), rt ∈ Ω(1 + n5940)

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

No more defined symbols left to analyse.

(23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

(24) BOUNDS(n^1, INF)

(25) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)
length(gen_nil:cons:leaf:node6_0(n320_0)) → gen_0':s7_0(n320_0), rt ∈ Ω(1 + n3200)

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

No more defined symbols left to analyse.

(26) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

(27) BOUNDS(n^1, INF)

(28) Obligation:

TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
ac
ad

Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: a → nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → a → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_a4_0 :: a
hole_c:d5_0 :: c:d
gen_nil:cons:leaf:node6_0 :: Nat → nil:cons:leaf:node
gen_0':s7_0 :: Nat → 0':s

Lemmas:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

Generator Equations:
gen_nil:cons:leaf:node6_0(0) ⇔ nil
gen_nil:cons:leaf:node6_0(+(x, 1)) ⇔ cons(hole_a4_0, gen_nil:cons:leaf:node6_0(x))
gen_0':s7_0(0) ⇔ 0'
gen_0':s7_0(+(x, 1)) ⇔ s(gen_0':s7_0(x))

No more defined symbols left to analyse.

(29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s7_0(+(1, n9_0)), gen_0':s7_0(n9_0)) → false, rt ∈ Ω(1 + n90)

(30) BOUNDS(n^1, INF)